3.434 \(\int \frac{(a+b \log (c (d (e+f x)^p)^q))^2}{(g+h x)^3} \, dx\)

Optimal. Leaf size=222 \[ \frac{b^2 f^2 p^2 q^2 \text{PolyLog}\left (2,-\frac{f g-e h}{h (e+f x)}\right )}{h (f g-e h)^2}-\frac{b f^2 p q \log \left (\frac{f g-e h}{h (e+f x)}+1\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)^2}-\frac{b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(g+h x) (f g-e h)^2}-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac{b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2} \]

[Out]

-((b*f*p*q*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q]))/((f*g - e*h)^2*(g + h*x))) - (a + b*Log[c*(d*(e + f*x)^
p)^q])^2/(2*h*(g + h*x)^2) + (b^2*f^2*p^2*q^2*Log[g + h*x])/(h*(f*g - e*h)^2) - (b*f^2*p*q*(a + b*Log[c*(d*(e
+ f*x)^p)^q])*Log[1 + (f*g - e*h)/(h*(e + f*x))])/(h*(f*g - e*h)^2) + (b^2*f^2*p^2*q^2*PolyLog[2, -((f*g - e*h
)/(h*(e + f*x)))])/(h*(f*g - e*h)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.816803, antiderivative size = 257, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 10, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, Rules used = {2398, 2411, 2347, 2344, 2301, 2317, 2391, 2314, 31, 2445} \[ -\frac{b^2 f^2 p^2 q^2 \text{PolyLog}\left (2,-\frac{h (e+f x)}{f g-e h}\right )}{h (f g-e h)^2}+\frac{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac{b f^2 p q \log \left (\frac{f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)^2}-\frac{b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(g+h x) (f g-e h)^2}-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac{b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/(g + h*x)^3,x]

[Out]

-((b*f*p*q*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q]))/((f*g - e*h)^2*(g + h*x))) + (f^2*(a + b*Log[c*(d*(e +
f*x)^p)^q])^2)/(2*h*(f*g - e*h)^2) - (a + b*Log[c*(d*(e + f*x)^p)^q])^2/(2*h*(g + h*x)^2) + (b^2*f^2*p^2*q^2*L
og[g + h*x])/(h*(f*g - e*h)^2) - (b*f^2*p*q*(a + b*Log[c*(d*(e + f*x)^p)^q])*Log[(f*(g + h*x))/(f*g - e*h)])/(
h*(f*g - e*h)^2) - (b^2*f^2*p^2*q^2*PolyLog[2, -((h*(e + f*x))/(f*g - e*h))])/(h*(f*g - e*h)^2)

Rule 2398

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2347

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/(x_), x_Symbol] :> Dist[1/d, Int[((
d + e*x)^(q + 1)*(a + b*Log[c*x^n])^p)/x, x], x] - Dist[e/d, Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; F
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2314

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[(x*(d + e*x^r)^(q
+ 1)*(a + b*Log[c*x^n]))/d, x] - Dist[(b*n)/d, Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x)^3} \, dx &=\operatorname{Subst}\left (\int \frac{\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x)^3} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\operatorname{Subst}\left (\frac{(b f p q) \int \frac{a+b \log \left (c d^q (e+f x)^{p q}\right )}{(e+f x) (g+h x)^2} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\operatorname{Subst}\left (\frac{(b p q) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac{f g-e h}{f}+\frac{h x}{f}\right )^2} \, dx,x,e+f x\right )}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\operatorname{Subst}\left (\frac{(b p q) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{\left (\frac{f g-e h}{f}+\frac{h x}{f}\right )^2} \, dx,x,e+f x\right )}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{(b f p q) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac{f g-e h}{f}+\frac{h x}{f}\right )} \, dx,x,e+f x\right )}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\operatorname{Subst}\left (\frac{(b f p q) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{\frac{f g-e h}{f}+\frac{h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (b f^2 p q\right ) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (b^2 f p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{f g-e h}{f}+\frac{h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac{b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac{b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}+\operatorname{Subst}\left (\frac{\left (b^2 f^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac{f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac{b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac{b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}-\frac{b^2 f^2 p^2 q^2 \text{Li}_2\left (-\frac{h (e+f x)}{f g-e h}\right )}{h (f g-e h)^2}\\ \end{align*}

Mathematica [A]  time = 0.527637, size = 316, normalized size = 1.42 \[ -\frac{\frac{b^2 p^2 q^2 \left (2 f^2 (g+h x)^2 \text{PolyLog}\left (2,\frac{h (e+f x)}{e h-f g}\right )-2 f^2 (g+h x)^2 \log \left (\frac{f (g+h x)}{f g-e h}\right )+h (e+f x) \log ^2(e+f x) (e h-f (2 g+h x))+2 f (g+h x) \log (e+f x) \left (f (g+h x) \log \left (\frac{f (g+h x)}{f g-e h}\right )+h (e+f x)\right )\right )}{(f g-e h)^2}+\frac{2 b p q \left (h (e+f x) \log (e+f x) (e h-f (2 g+h x))+f (g+h x) \left (f (g+h x) \log \left (\frac{f (g+h x)}{f g-e h}\right )+h (e+f x)\right )\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-b p q \log (e+f x)\right )}{(f g-e h)^2}+\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-b p q \log (e+f x)\right )^2}{2 h (g+h x)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/(g + h*x)^3,x]

[Out]

-((a - b*p*q*Log[e + f*x] + b*Log[c*(d*(e + f*x)^p)^q])^2 + (2*b*p*q*(a - b*p*q*Log[e + f*x] + b*Log[c*(d*(e +
 f*x)^p)^q])*(h*(e + f*x)*(e*h - f*(2*g + h*x))*Log[e + f*x] + f*(g + h*x)*(h*(e + f*x) + f*(g + h*x)*Log[(f*(
g + h*x))/(f*g - e*h)])))/(f*g - e*h)^2 + (b^2*p^2*q^2*(h*(e + f*x)*(e*h - f*(2*g + h*x))*Log[e + f*x]^2 - 2*f
^2*(g + h*x)^2*Log[(f*(g + h*x))/(f*g - e*h)] + 2*f*(g + h*x)*Log[e + f*x]*(h*(e + f*x) + f*(g + h*x)*Log[(f*(
g + h*x))/(f*g - e*h)]) + 2*f^2*(g + h*x)^2*PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)]))/(f*g - e*h)^2)/(2*h*(g
+ h*x)^2)

________________________________________________________________________________________

Maple [F]  time = 0.678, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) \right ) ^{2}}{ \left ( hx+g \right ) ^{3}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^3,x)

[Out]

int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^3,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a b f p q{\left (\frac{f \log \left (f x + e\right )}{f^{2} g^{2} h - 2 \, e f g h^{2} + e^{2} h^{3}} - \frac{f \log \left (h x + g\right )}{f^{2} g^{2} h - 2 \, e f g h^{2} + e^{2} h^{3}} + \frac{1}{f g^{2} h - e g h^{2} +{\left (f g h^{2} - e h^{3}\right )} x}\right )} - \frac{1}{2} \, b^{2}{\left (\frac{\log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )^{2}}{h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h} - 2 \, \int \frac{e h \log \left (c\right )^{2} + 2 \, e h \log \left (c\right ) \log \left (d^{q}\right ) + e h \log \left (d^{q}\right )^{2} +{\left (f h \log \left (c\right )^{2} + 2 \, f h \log \left (c\right ) \log \left (d^{q}\right ) + f h \log \left (d^{q}\right )^{2}\right )} x +{\left (f g p q + 2 \, e h \log \left (c\right ) + 2 \, e h \log \left (d^{q}\right ) +{\left (f h p q + 2 \, f h \log \left (c\right ) + 2 \, f h \log \left (d^{q}\right )\right )} x\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )}{f h^{4} x^{4} + e g^{3} h +{\left (3 \, f g h^{3} + e h^{4}\right )} x^{3} + 3 \,{\left (f g^{2} h^{2} + e g h^{3}\right )} x^{2} +{\left (f g^{3} h + 3 \, e g^{2} h^{2}\right )} x}\,{d x}\right )} - \frac{a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h} - \frac{a^{2}}{2 \,{\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^3,x, algorithm="maxima")

[Out]

a*b*f*p*q*(f*log(f*x + e)/(f^2*g^2*h - 2*e*f*g*h^2 + e^2*h^3) - f*log(h*x + g)/(f^2*g^2*h - 2*e*f*g*h^2 + e^2*
h^3) + 1/(f*g^2*h - e*g*h^2 + (f*g*h^2 - e*h^3)*x)) - 1/2*b^2*(log(((f*x + e)^p)^q)^2/(h^3*x^2 + 2*g*h^2*x + g
^2*h) - 2*integrate((e*h*log(c)^2 + 2*e*h*log(c)*log(d^q) + e*h*log(d^q)^2 + (f*h*log(c)^2 + 2*f*h*log(c)*log(
d^q) + f*h*log(d^q)^2)*x + (f*g*p*q + 2*e*h*log(c) + 2*e*h*log(d^q) + (f*h*p*q + 2*f*h*log(c) + 2*f*h*log(d^q)
)*x)*log(((f*x + e)^p)^q))/(f*h^4*x^4 + e*g^3*h + (3*f*g*h^3 + e*h^4)*x^3 + 3*(f*g^2*h^2 + e*g*h^3)*x^2 + (f*g
^3*h + 3*e*g^2*h^2)*x), x)) - a*b*log(((f*x + e)^p*d)^q*c)/(h^3*x^2 + 2*g*h^2*x + g^2*h) - 1/2*a^2/(h^3*x^2 +
2*g*h^2*x + g^2*h)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + 2 \, a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a^{2}}{h^{3} x^{3} + 3 \, g h^{2} x^{2} + 3 \, g^{2} h x + g^{3}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^3,x, algorithm="fricas")

[Out]

integral((b^2*log(((f*x + e)^p*d)^q*c)^2 + 2*a*b*log(((f*x + e)^p*d)^q*c) + a^2)/(h^3*x^3 + 3*g*h^2*x^2 + 3*g^
2*h*x + g^3), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(d*(f*x+e)**p)**q))**2/(h*x+g)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )}^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^3,x, algorithm="giac")

[Out]

integrate((b*log(((f*x + e)^p*d)^q*c) + a)^2/(h*x + g)^3, x)